﻿@model BcdVolumeDirectoryViewModel
@{
    Layout = null;
    ViewBag.Title = "组卷";
}
<script src="/Scripts/jQuery/jquery.validate.min.js" type="text/javascript"></script>
<script src="/Scripts/jQuery/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
@{Html.EnableClientValidation();}
<script type="text/javascript">
    function dialogRefresh(json) {
        DWZ.ajaxDone(json);
        if (json.statusCode == DWZ.statusCode.ok) {
            refre_jgzl_cllx_index(json);
            $("#jgzl_cllx_list_@(ViewBag.Type)").loadUrl('/CompletionMaterials/ProFileType/Detail', "tab_i=0&type=@(ViewBag.Type)&id=@(ViewBag.pftId)", function (message) {
                $('#jgzl_cllx_list_@(ViewBag.Type)').parent().find("[layoutH]").layoutH();
            });
            $.pdialog.closeCurrent();
        }
    }
    function openDialog_fileCheckList() {
        var options = {
            mask: true,
            width: 700, height: 400,
            maxable: eval("true"),
            resizable: eval("true")
        };
        $.pdialog.open("/CompletionMaterials/VolumeList/FileCheckList?pftId=@(ViewBag.pftId)&fileIds=" + $("#input_fileIds").val(), "jgzl_wjxz_list", "添加归档材料", options);
    }
    function delFile(id) {
        $("#tr_" + id).remove();
        var fIds = $("#input_fileIds").val();
        fIds = fIds.replace(id + ",", "");
        $("#input_fileIds").val(fIds);
        var i = -1;
        $("#table_fileList tr").each(function () {
            $(this).find("input").each(function () {
                this.id = "TheBcdVolumedirectoryList_" + i + "__." + this.name.split('.')[1]
                this.name = "TheBcdVolumedirectoryList[" + i + "]." + this.name.split('.')[1]
            });
            i++;
        });
    }
</script>
@using (Html.BeginForm("FileCreatPost", "VolumeList", null, FormMethod.Post, new { onsubmit = "return validateCallback(this,dialogRefresh);", @class = "pageForm required-validate" }))
{
    <div class="pageContent">
        <div class="tabs" currentindex="0" eventtype="click" layouth="35">
            <div class="tabsHeader">
                <div class="tabsHeaderContent">
                    <ul id="ul_filelist">
                        <li><a href="javascript:;"><span>归档材料</span></a></li>
                        <li><a href="javascript:;"><span>案卷信息</span></a></li>
                    </ul>
                </div>
            </div>
            <div class="tabsContent">
                <div layouth="75" style="margin: 5px;">
                    <button type="button" class="btn btn-min" onclick="openDialog_fileCheckList()">添加归档材料</button>
                    <input type="hidden" id="input_fileIds" />
                    <table class="tab012" width="100%" id="table_fileList">
                        <tr>
                            <td width="60">卷内序号</td>
                            <td width="140">文件编号</td>
                            <td>文件材料题名</td>
                            <td width="50">总页数</td>
                            <td width="75">卷内页数</td>
                            <td width="45">操作</td>
                        </tr>
                    </table>
                </div>
                <div>
                    @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_ID, new { @type = "hidden" })
                    @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Pft_ID, new { @type = "hidden" })
                    <table class="tab01 tabNo" width="95%;">
                        <tr>
                            <td class="td1" style="width: 35%;">文件类型：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_FileType, new { @class = "input02" })
                                @Html.ValidationMessageFor(model => model.TheBcdFilelistInfo.Fl_FileType)
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">档案号：</td>
                            <td>
                                @Html.TextAreaFor(model => model.TheBcdFilelistInfo.Fl_Code, new { @class = "input05" })
                                @Html.ValidationMessageFor(model => model.TheBcdFilelistInfo.Fl_Code)
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">流水号：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_Numb, new {Value=Model.TheBcdFilelistInfo.Fl_Numb.ToString("D3"), @class = "input02 digits" })
                                @Html.ValidationMessageFor(model => model.TheBcdFilelistInfo.Fl_Numb)
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">档案馆号：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_Archive, new { @class = "input02" })
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">项目名称：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_Item, new { @class = "input02" })
                                @Html.ValidationMessageFor(model => model.TheBcdFilelistInfo.Fl_Item)
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">起讫里程/有关单位：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_FileTitle, new { @class = "input02" })
                                @Html.ValidationMessageFor(model => model.TheBcdFilelistInfo.Fl_FileTitle)
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">文件名称：</td>
                            <td>
                                @Html.TextAreaFor(model => model.TheBcdFilelistInfo.Fl_FileName, new { cols = "3", @class = "input05" })
                                @Html.ValidationMessageFor(model => model.TheBcdFilelistInfo.Fl_FileName)
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">立卷单位：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_Unit, new { @class = "input02" })
                                @Html.ValidationMessageFor(model => model.TheBcdFilelistInfo.Fl_Unit)
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">起止日期：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_StartDate, new { @class = "date ", @readonly = "readonly", format = "yyyy-MM", @style = "width:91px;float:left;" })<span style="float: left;">—</span>@Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_EndDate, new { @class = "date ", @readonly = "readonly", format = "yyyy-MM", @style = "width:91px;" })
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">件数：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_Kit, new { @class = "input02" })
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">总页数：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_Page, new { @class = "input02" })
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">保管期限：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_Kept, new { @class = "input02" })
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">密级：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_Level, new { @class = "input02" })
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">立卷人：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_FilingMan, new { @class = "input02" })
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">立卷时间：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_FilingTime, new { @class = "date input02", @readonly = "readonly", format = "yyyy-MM-dd" })
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">检查人：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_CheckMan, new { @class = "input02" })
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">检查时间：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_CheckTime, new { @class = "date input02", @readonly = "readonly", format = "yyyy-MM-dd" })
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">互见号：</td>
                            <td>
                                @Html.TextBoxFor(model => model.TheBcdFilelistInfo.Fl_TheNo, new { @class = "input02" })
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">说明：</td>
                            <td>
                                @Html.TextAreaFor(model => model.TheBcdFilelistInfo.Fl_Explain, new { cols = "3", @class = "input05" })
                            </td>
                        </tr>
                        <tr>
                            <td class="td1">备注：</td>
                            <td>
                                @Html.TextAreaFor(model => model.TheBcdFilelistInfo.Fl_Remark, new { cols = "3", @class = "input05" })
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="formBar">
        <ul>
            <li>
                <button type="submit" class="btn btn-sm">保存</button>
            </li>
            <li>
                <button type="button" class="close btn btn-default btn-sm">取消</button>
            </li>

        </ul>
    </div>
}